home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. Windows 3
/
dr win3.zip
/
dr win3
/
DEMONSTR
/
MATHVIEW.ZIP
/
FAC.M
< prev
next >
Wrap
Text File
|
1994-01-23
|
269b
|
16 lines
function [y]=fac(n)
% y=fac(n)
% computes n factorial (demonstrate a recursive function call)
% n should be a positive integer
% S.Halevy 7/31/92
% Copyright (c) 1992 by the MathWizards
if (n<=1)
y=n;
return
end
y=n*fac(n-1);